<!DOCTYPE html>
<html>
<head>
<#include "/freemarker/fw/meta_top.ftl">
    <title>${book.getStr("bookname")}</title>
    <#include "/freemarker/fw/load_static.ftl">
</head>
<body onload="Pinion.visit('${book.class.name}', ${book.id})">
<#include "/freemarker/fw/navbar_top.ftl">
    <div class="container">
        <div class="main row">
            <div class="book-area col-lg-6">
                <div class="grid" style="padding: 5px">
                    <h3 style="margin:0px; display: inline-block">${book.bookname}</h3>
                    <#if book.isAuthor(session["user"])>
                        <span class="btn btn-default pull-right" data-direct="/book/edit/${book.id}">编辑</span>
                    </#if>
                    <div style="">
                        <span data-id="${book.author.id}" data-type="username">${book.pseudonym}</span>
                    </div>
                </div>
                <#assign chapters = book.chapters>
                <#include "/book/chapter_list.ftl">
            </div>

            <#assign comments = book.getComments()>
            <#assign commentTarget = book>
            <#include "/book/comment_area.ftl">
        </div>
    </div>
</body>
</html>